home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.JComboBox;
- import com.sun.java.swing.JComponent;
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Dimension;
- import java.awt.Insets;
- import java.awt.LayoutManager;
- import java.awt.Rectangle;
-
- public class BasicComboBoxUI$ComboBoxLayoutManager implements LayoutManager {
- // $FF: synthetic field
- BasicComboBoxUI this$0;
-
- public void addLayoutComponent(String name, Component comp) {
- }
-
- public void removeLayoutComponent(Component comp) {
- }
-
- public Dimension preferredLayoutSize(Container parent) {
- JComboBox var10000 = (JComboBox)parent;
- return parent.getPreferredSize();
- }
-
- public Dimension minimumLayoutSize(Container parent) {
- JComboBox var10000 = (JComboBox)parent;
- return parent.getMinimumSize();
- }
-
- public void layoutContainer(Container parent) {
- JComboBox cb = (JComboBox)parent;
- int width = ((JComponent)cb).getWidth();
- int height = ((JComponent)cb).getHeight();
- Insets insets = this.this$0.getInsets();
- int buttonSize = height - (insets.top + insets.bottom);
- if (this.this$0.editor != null) {
- Rectangle cvb = this.this$0.rectangleForCurrentValue();
- this.this$0.editor.setBounds(cvb);
- }
-
- if (this.this$0.arrowButton != null) {
- this.this$0.arrowButton.setBounds(width - (insets.right + buttonSize), insets.top, buttonSize, buttonSize);
- }
-
- }
-
- // $FF: synthetic method
- public BasicComboBoxUI$ComboBoxLayoutManager(BasicComboBoxUI this$0) {
- this.this$0 = this$0;
- }
- }
-